<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');



class MY_Controller extends CI_Controller{
    
    protected $resp = array();
    
    function __construct()
    {
        parent::__construct();
        $this->__init();
    }
    
    /**
     * 
     */
    private function __init(){
        $this->resp['status'] = 500;
        $this->resp['msg'] = 'Server Error';
        //$this->load->library('acl_auth');
        
        $cookie = array(
            'name'   => 'burl',
            'value'  => base_url(''),
            'expire' => '86500',
            //'domain' => '.some-domain.com',
            'path'   => '/',
            'prefix' => 't_',
            //'secure' => TRUE
        );
        $this->input->set_cookie($cookie);

    }

    protected function isPost(){
        return $this->input->server('REQUEST_METHOD')==='POST'?true:false;
    }
    /**
     * 
     * @param boolean $config
     */
    protected function enableProfiler($config = array())
    {
        $this->output->enable_profiler(false);
        //$this->output->enable_profiler(TRUE);
//        if (!$config){
//            $config = array(
//                'config'  => TRUE,
//                'queries' => TRUE
//            );
//        }
//        $this->output->set_profiler_sections($config);
    }
}
